--[[/**
-- * 
 * 己方一律往右退 敌方一律往左退
 * @author wangjunhui
-- *
-- */]]

---@class BuffEffect182100 : BaseBuffEffect
BuffEffect182100 = ClientFight.CreateClass("BuffEffect182100", ClientFight.BaseBuffEffect)
local t = BuffEffect182100

---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    if (buff.target:isDie()) then
    return IBuffEffect.REMOVE;
    end

    local back = buff.buffBean.f_BuffEffectValue[1] / 10000;
    if (buff.target.teamIndex == 0) then
    back = back * -1;
    end
    fighterManager.changePosition(fight, buff.target, 0, buff.target.position.x + back,
    buff.target.position.y, 0, true, true, true);
    SkillRoleMgr.savePathFile("[" .. fight.frame .. "][EFFECT]Fighter " .. buff.target.fighterId .. " Buff"
    .. buff.modelId .. " 击退到" .. getJsonStr(buff.target.position));

    buff.target.moveTarget = nil;
    buff.target.moveDirection = 0;
    buff.target.moveAction = nil;
    buff.target.movePosition = nil;

    return ClientFight.BaseBuffEffect.action(self, fight, buff, ...);
end

t.New()